from typing import Optional, Tuple

from django.db.models import QuerySet

from server.apps.main.logic.todo import  commands, queries
from server.apps.main.models import Todolist

def run(
    id: int) -> QuerySet[Todolist]:
        commands.set_isdone(id)
        todo = queries.find_by_id(id)
        return todo
    
    
    #if not title:
    #    title = queries.get_title(id)
    #if not description:
    #    description = queries.get_description(id)
    #commands.edit(id,title,description)
